# -*- coding: utf-8 -*-
# @Time    : 2021/9/15 19:19
# @Author  : BrandonGT
# @FileName: 9_14_lottery.py

from random import choice


class Lottery:
    def __init__(self):
        self.lottery = [1, 2, 5, 10, 30, 50, 12, 52, 20, 52, "a", "bd", "cs"]
        self.result = []

    def roll_lottery(self, num):
        self.result = []
        for i in range(num):
            self.result.append(choice(self.lottery))
        # self.show_result()
        return self.result

    def show_result(self):
        for result in self.result:
            print(f"The Number or Letter is: {result}")


# my_lottery = Lottery()
# my_lottery.roll_lottery()

my_lottery = [1, 5, 10, "a"]
# my_lottery = [1]
lottery_check = True
lottery_counts = 1
sys_lottery = Lottery()

# sys_lottery.roll_lottery()
# sys_lottery.show_result()

while lottery_check:
    result = sys_lottery.roll_lottery(4)
    if my_lottery == result:
        lottery_check = False
        msg = f"The possibility of winning a prize is {1/lottery_counts*100}%"
        print(msg)
    else:
        lottery_counts += 1